package plugins.detail;

import kd.bos.base.AbstractBasePlugIn;
import kd.bos.context.RequestContext;
import kd.sdk.plugin.Plugin;

import java.util.EventObject;

/**
 * 基础资料插件
 */
public class SchoolCardInvisible extends AbstractBasePlugIn implements Plugin {

    @Override
    public void afterLoadData(EventObject e) {
        super.afterLoadData(e);

        // 获取当前用户名
        String currentUserName = RequestContext.get().getUserName();

        // 如果当前用户是陈旭，则隐藏特定按钮
        if ("吕璐君".equals(currentUserName)) {
            this.getView().setVisible(false, "bar_new");

        }
    }

}